package pages;

import core.TestBase;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import utils.Log4Test;

public class NotebooksComparison extends TestBase {

    protected By TextComp = By.xpath("//*[@class='title-page']");
    protected By CompareItemsZ0PU002JE = By.xpath("//*[@class='scroll']/table/thead");
    protected By CompareItemsME294UAA = By.xpath("//*[@class='scroll']/table/thead");
    private String URL = "http://rozetka.com.ua/computers-notebooks/notebooks/comparison/ids=699984%2C338650/";

    public boolean isOpened() {
        Log4Test.info("page is opened");
        return webDriver.getCurrentUrl().equals(URL);
    }

    public WebElement verifyText() {
        Log4Test.info("Compare Page text");
        Element = webDriver.findElement(TextComp);
        Log4Test.info(Element.getText().toString());
        return Element;
    }

    public WebElement verifyCompareItemsZ0PU002JE() {
        Log4Test.info("verify Compare Items Z0PU002JE");
        Element = webDriver.findElement(CompareItemsZ0PU002JE);
        Log4Test.info(Element.getText().toString());
        return Element;
    }

    public WebElement verifyCompareItemsME294UAA() {
        Log4Test.info("verify Compare Items ME294UAA");
        Element = webDriver.findElement(CompareItemsME294UAA);
        Log4Test.info(Element.getText().toString());
        return Element;
    }

}